<%@ include file="/WEB-INF/jsp/includes.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>
<P>
<H2>Find Visits:</H2>
<form:errors path="*"/>
<form:form action="${rc.requestUri}" method="get">
Start Date: <form:input path="startDate"/> <br/>
End Date: <form:input path="endDate"/> <br/>
<input type="submit" value="Search"/>
</form:form>
<TABLE border="1">
<tr>
  <TH>Date</TH>
  <TH>Vet</TH>
  <TH>Owner</TH>
  <TH>Pet</TH>
  <TH>Description</TH>
  </tr>
  <c:forEach var="visit" items="${visits}">
    <TR>
      <TD><fmt:formatDate value="${visit.date}"/></TD>
      <TD><c:out value="${visit.vet.lastName}"/>, <c:out value="${visit.vet.firstName}"/></TD>
      <TD><c:out value="${visit.pet.owner.lastName}"/>, <c:out value="${visit.pet.owner.firstName}"/></TD>
      <TD><c:out value="${visit.pet.name}"/></TD>
      <TD><c:out value="${visit.description}"/></TD>
    </TR>
  </c:forEach>
</TABLE>

<P>
<BR>
<%@ include file="/WEB-INF/jsp/footer.jsp" %>
